The longer a storage device is used, the amount of free, unwritten space decreases. The decrease of free, unwritten space is especially true in storage devices used in data centers or other network-accessed shared storage architectures. When the storage device is a solid state drive (SSD), the decrease in free, unwritten space causes the performance of the device to decrease. The performance decrease is accounted for because the SSD must erase the space necessary for the new data prior to writing the data. The extra delay in writing the data reduces throughput performance.
Traditionally, a write to an SSD or other storage device that requires erasing prior to writing, includes a host system sending data to a disk controller or comparable controller device. The disk controller separates the data into blocks for storage on the storage devices, and issues a write command to the storage device itself. The storage device executes local firmware to determine how to store the data on the physical medium of the storage device. Traditional firmware includes the following conditions:
If the data is not edited data, and there are adequate free pages on the storage device, the local controller writes the data directly to the media;
If the data is not edited data, and there are not adequate free pages on the storage device, the local controller obtains address(es) of block(s) marked for deletion, and erases the block(s). Only after the completing the erase function, the local controller writes the new data to the newly erased pages;
If the data is edited data, and there are adequate free pages on the storage device, the local controller reads the original data, modifies the original data with the new data, and writes the modified data to the free pages on the media. The local controller then marks the old pages for deletion; and
If the data is edited data, and there are not adequate free pages on the storage device, the local controller reads the original data and modifies the original data with the new data. The local controller obtains address(es) of block(s) marked for deletion, and erases the block(s). Only after completing the erase function, the local controller writes the modified data to the newly erased pages. The local controller then marks the old pages for deletion.
The delay created by the requirement to erase pages prior to performing a write when there are not adequate free pages can become a significant performance bottleneck in a data storage subsystem having a heavy access load, such as a data center.
Descriptions of certain details and embodiments follow, including a description of the figures, which can depict some or all of the embodiments described below, as well as discussing other potential embodiments or implementations of the technology presented herein.